package edu.qhst.user.dto.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户注册 请求DTO
 *
 * @author 加浓美式
 * @date 2023/6/22
 */
@Data
public class UserRegisterReqDto implements Serializable {

    /**
     * 姓名
     * 性别
     * 班级
     * 学号（完整学号）
     * 手机号
     * 邮箱（后续用于接收是否通过审核短信）
     */
    @Serial
    private static final long serialVersionUID = 3191241716373120793L;

    @Schema(description = "完整学号")
    private String userAccount;

    @Schema(description = "姓名")
    private String username;

    @Schema(description = "班级")
    private String userClass;

    @Schema(description = "手机号", required = true)
    @NotBlank(message="手机号不能为空！")
    @Pattern(regexp="^1[3|4|5|6|7|8|9][0-9]{9}$",message="手机号格式不正确！")
    private String phone;

    @Schema(description = "性别", required = true)
    private int gender;

    @Schema(description = "邮箱", required = true)
    @NotBlank(message="邮箱不能为空！")
    private String email;
}
